package com.alex.activity;

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;

import com.alex.http.AGetReuqest;
import com.alex.http.AHandledResult;
import com.alex.http.AHttpEngine;
import com.alex.http.AHttpListener;


public class AlexHttpActivity extends Activity implements AHttpListener{
    /** Called when the activity is first created. */
	private String TAG = "AlexHttpActivity";
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        long li = 0x01;
        String url = "http://www.baidu.com";
        AGetReuqest get = new AGetReuqest(li, url, this, null);
        AHttpEngine.getInstance().request(get);
        li++;
        get = new AGetReuqest(li, url, this, null);
        AHttpEngine.getInstance().request(get);
        li++;
        get = new AGetReuqest(li, url, this, null);
        AHttpEngine.getInstance().request(get);
        li++;
        get = new AGetReuqest(li, url, this, null);
        AHttpEngine.getInstance().request(get);
        li++;
        get = new AGetReuqest(li, url, this, null);
        AHttpEngine.getInstance().request(get);
    }

    
	@Override
	public void onError(long paramLong, Bundle paramBundle) {
		// TODO Auto-generated method stub
		Log.e(TAG, paramLong+"  onError");
	}

	@Override
	public void onResult(long paramLong, Bundle paramBundle,
			AHandledResult paramHandledResult) {
		// TODO Auto-generated method stub
		Log.e(TAG, paramLong+"  onResult");
	}

	@Override
	public void onResult(long paramLong, Bundle paramBundle, String content) {
		// TODO Auto-generated method stub
		Log.e(TAG, paramLong+"  onResult2");
	}
}